org.eclipse.vtp.framework.interactions.voice.vxml
Class Item

java.lang.Object
  extended by org.eclipse.vtp.framework.interactions.core.support.Widget
      extended by org.eclipse.vtp.framework.interactions.voice.vxml.Iota
          extended by org.eclipse.vtp.framework.interactions.voice.vxml.Item
All Implemented Interfaces:
VXMLConstants

public class Item
extends Iota

A single item contained in a Rule.

Version:
2.0
Author:
Trip Gilman, Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.interactions.voice.vxml.VXMLConstants
EMPTY, FILE_EXT_GSL, FILLED_MODE_ALL, FILLED_MODE_ANY, GRAMMAR_MODE_DTMF, GRAMMAR_MODE_VOICE, METHOD_GET, METHOD_POST, MIME_TYPE_GSL, MIME_TYPE_SRGS, NAME_APPLICATION, NAME_ASSIGN, NAME_AUDIO, NAME_BARGEIN, NAME_BEEP, NAME_BLOCK, NAME_BRIDGE, NAME_CATCH, NAME_CHOICE, NAME_COMPLETETIMEOUT, NAME_COND, NAME_CONFIDENCELEVEL, NAME_COUNT, NAME_DEST, NAME_DISCONNECT, NAME_DTMF, NAME_DTMFTERM, NAME_ELSE, NAME_ELSEIF, NAME_ENCTYPE, NAME_ENUMERATE, NAME_ERROR, NAME_EVENT, NAME_EVENTEXPR, NAME_EXIT, NAME_EXPR, NAME_FIELD, NAME_FILLED, NAME_FINALSILENCE, NAME_FORM, NAME_GOTO, NAME_GRAMMAR, NAME_ID, NAME_IF, NAME_INCOMPLETETIMEOUT, NAME_INPUTMODES, NAME_INTERDIGITTIMEOUT, NAME_ITEM, NAME_MAXNBEST, NAME_MAXSPEECHTIMEOUT, NAME_MAXTIME, NAME_MENU, NAME_METHOD, NAME_MODE, NAME_NAME, NAME_NAMELIST, NAME_NEXT, NAME_NOINPUT, NAME_NOMATCH, NAME_ONE_OF, NAME_OPTION, NAME_PARAM, NAME_PROMPT, NAME_PROPERTY, NAME_RECORD, NAME_REPEAT, NAME_REPROMPT, NAME_RETURN, NAME_ROOT, NAME_RULE, NAME_SCOPE, NAME_SCRIPT, NAME_SENSITIVITY, NAME_SPEEDVSACCURACY, NAME_SRC, NAME_SUBDIALOG, NAME_SUBMIT, NAME_TERMCHAR, NAME_TERMTIMEOUT, NAME_THROW, NAME_TIMEOUT, NAME_TRANSFER, NAME_TYPE, NAME_VALUE, NAME_VAR, NAME_VERSION, NAME_VXML, NAMESPACE_URI_VXML, QNAME_XML_LANG, SCOPE_DIALOG, SCOPE_DOCUMENT, TYPE_CDATA, VERSION_2_0
 
Constructor Summary
Item(OneOf content)
          Creates a new Item.
Item(java.lang.String content)
          Creates a new Item.
 
Method Summary
 java.lang.Object getContent()
          Returns the acceptable value(s) for this item.
 int getMaximumRepeat()
          Returns the maximum number of times this item may be repeated.
 int getMinimumRepeat()
          Returns the minimum number of times this item must be repeated.
 void setContent(OneOf content)
          Sets the set of values that are acceptable for this item.
 void setContent(java.lang.String content)
          Sets the single value that is acceptable for this item.
 void setMaximumRepeat(int maximumRepeat)
          Sets the maximum number of times this item may be repeated.
 void setMinimumRepeat(int minimumRepeat)
          Sets the minimum number of times this item must be repeated.
protected  void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
          Write the attribute members of this grammar to the supplied set.
protected  void writeContent(org.xml.sax.ContentHandler outputHandler)
          Write the content of this item to the specified content handler.
 void writeWidget(org.xml.sax.ContentHandler outputHandler)
          Writes the content of this widget to an XML content handler.
 
Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Item

public Item(java.lang.String content)
     throws java.lang.NullPointerException
Creates a new Item.

Parameters:
content - The single value that is acceptable for this item.
Throws:
java.lang.NullPointerException - If the specified value is null.

Item

public Item(OneOf content)
     throws java.lang.NullPointerException
Creates a new Item.

Parameters:
content - The set of values that are acceptable for this item.
Throws:
java.lang.NullPointerException - If the specified set of values is null.
Method Detail

getContent

public java.lang.Object getContent()
Returns the acceptable value(s) for this item.

Returns:
The acceptable value(s) for this item.

getMinimumRepeat

public int getMinimumRepeat()
Returns the minimum number of times this item must be repeated.

Returns:
The minimum number of times this item must be repeated.

getMaximumRepeat

public int getMaximumRepeat()
Returns the maximum number of times this item may be repeated.

Returns:
The maximum number of times this item may be repeated.

setContent

public void setContent(java.lang.String content)
                throws java.lang.NullPointerException
Sets the single value that is acceptable for this item.

Parameters:
content - The single value that is acceptable for this item.
Throws:
java.lang.NullPointerException - If the specified value is null.

setContent

public void setContent(OneOf content)
                throws java.lang.NullPointerException
Sets the set of values that are acceptable for this item.

Parameters:
content - The set of values that are acceptable for this item.
Throws:
java.lang.NullPointerException - If the specified set of values is null.

setMinimumRepeat

public void setMinimumRepeat(int minimumRepeat)
                      throws java.lang.IllegalArgumentException
Sets the minimum number of times this item must be repeated.

Parameters:
minimumRepeat - The minimum number of times this item must be repeated.
Throws:
java.lang.IllegalArgumentException - If the specified value is less than zero.

setMaximumRepeat

public void setMaximumRepeat(int maximumRepeat)
                      throws java.lang.IllegalArgumentException
Sets the maximum number of times this item may be repeated.

Parameters:
maximumRepeat - The maximum number of times this item may be repeated.
Throws:
java.lang.IllegalArgumentException - If the specified value is less than zero.

writeWidget

public void writeWidget(org.xml.sax.ContentHandler outputHandler)
                 throws java.lang.NullPointerException,
                        org.xml.sax.SAXException
Description copied from class: Widget
Writes the content of this widget to an XML content handler.

Specified by:
writeWidget in class Widget
Parameters:
outputHandler - The handler to write this widget to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of this widget fails.

writeAttributes

protected void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
Write the attribute members of this grammar to the supplied set.

Parameters:
attributes - The attribute set to write to.
Throws:
java.lang.NullPointerException - If the supplied attribute set is null.

writeContent

protected void writeContent(org.xml.sax.ContentHandler outputHandler)
                     throws java.lang.NullPointerException,
                            org.xml.sax.SAXException
Write the content of this item to the specified content handler.

Parameters:
outputHandler - The content handler to write to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of the content fails.